/*
 * @Author: 杨光辉(GerhardYang)
 * @Date: 2021-06-01 11:11:33
 * @LastEditors: 杨光辉(GerhardYang)
 * @LastEditTime: 2021-06-04 14:59:14
 * @Description: file content
 * @Copyright: 超图软件华中平台客户中心 (SuperMap Software Co., Ltd. -Central China Platform)
 */
import axios from "axios";

// 函数柯里化
export function get(url) {
  return (params) => {
    return axios
      .get(url, params)
      .then((res) => {
        return res;
      })
      .catch((err) => {
        console.error(err);
      });
  };
}

export function post(url) {
  return (params) => {
    axios
      .post(url, params)
      .then((res) => {
        return res;
      })
      .catch((err) => {
        console.error(err);
      });
  };
}
